const singer = [{
		name: '周杰伦',
		age: 34
	},
	{
		name: '许嵩',
		age: 34
	},
	{
		name: '邓紫棋',
		age: 44
	},
	{
		name: '张碧晨',
		age: 44
	},
	{
		name: '薛之谦',
		age: 44
	},
	{
		name: '封茗囧菌',
		age: 44
	},
]

Array.prototype.my_findIndex = function(callback) {

	for (let i = 0; i < this.length; i++) {
		if (callback(this[i], i, this)) {
			return i
		}
	}
	return -1
}

const newSinger = singer.my_findIndex((value, index, array) => {
	return value.age > 40
})
console.log(newSinger);
